package live_schedule

import (
	"github.com/gin-gonic/gin"
	"vrcm/src/vrcm/app/admin/apis/live_schedule"
	"vrcm/src/vrcm/app/admin/router"
)

func init() {
	router.NoCheckRole = append(router.NoCheckRole, registerSourceBasicRouter)
}

// registerSourceBasicRouter
func registerSourceBasicRouter(v1 *gin.RouterGroup) {
	api := apis.SourceBasic{}
	r := v1.Group("/source-basic")
	{
		r.POST("get-list", api.GetPage)
		r.GET("/:id", api.Get)
		r.POST("/insert", api.Insert)
		r.POST("/update", api.Update)
		r.POST("/start-source", api.StartSource)
		r.POST("/stop-source", api.StopSource)
		r.POST("/delete", api.Delete)
		r.POST("/change-source", api.ChangeSource)
		r.POST("/source-call-back", api.SourceCallBack)
		r.POST("/get-share-source-config", api.GetShareSourceConfig)
		r.POST("/get-share-sources", api.GetShareSources)
		r.POST("/update-share-source-config", api.UpdateShareSourceConfig)
		r.POST("/get-sources-statistics", api.GetSourcesStatistics)
		r.POST("/sources-transcode-task-page", api.SourcesTransCodeTaskPage)
		r.POST("/create-source-transcode-task", api.CreateSourceTransCodeTask)
		r.POST("/delete-source-transcode", api.DeleteSourceTransCode)
		r.POST("/stop-source-transcode", api.StopSourceTransCode)
		r.POST("/transcode-call-back", api.TransCodeCallBack)
		r.POST("/start-source-record", api.StartSourceRecord)
		r.POST("/stop-source-record", api.StopSourceRecord)
		r.POST("/record-file-call-back", api.RecordFileCallBack)
		r.POST("/get-source-record-page", api.GetSourceRecordPage)
		r.GET("/get-source-record/:source_id", api.GetSourceRecord)
		r.POST("/check-del-source", api.CheckDelSource)
		r.POST("/check-del-trans-source", api.CheckDelTransSource)
		r.POST("/start-source-transcode", api.StartTransCode)
		r.POST("/update-source-transcode", api.UpdateTransCode)
		r.GET("/get-switch-config", api.GetSwitchConfig)
		r.POST("/get-audit-statistic-by-source", api.GetAuditStatisticBySource)
		r.POST("/get-audit-statistic-by-type", api.GetAuditStatisticByType)
		r.POST("/update-audit-state", api.UpdateAuditState)
		r.POST("/get-audit-history-by-source", api.GetAuditHistoryBySource)
		r.POST("/del-source-record", api.DelSourceRecord)
		r.POST("/auto-switch-callback", api.AutoSwitchSourceCallBack)
		r.POST("/equip-beat", api.EquipBeat)
		r.POST("/update-share-remark", api.UpdateShareRemark)
	}
}
